//
//  BHCircleTextItemCollectionViewCell.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/6.
//

import UIKit

class BHCircleTextItemCollectionViewCell: UICollectionViewCell {

    @IBOutlet weak var text_label: UILabel!
    
    @IBOutlet weak var del_btn: UIButton!
    
    var model: BHCircleColumnModel! {
        didSet {
            if model.fixedFlag == 1 {
                self.text_label.text = model.name
            }else {
                self.text_label.text = model.name+"+"
            }
            
            if model.fixedFlag == 1 {
                self.del_btn.isHidden = true
            }else {
                self.del_btn.isHidden = !self.edite
            }
        }
    }
    
    
    var chose: Bool = false {
        didSet {
            self.text_label.isHighlighted = chose
            if chose == true {
                self.text_label.backgroundColor = .color_E2F8F0
                self.text_label.addLayerCorner(2, 0.5, .color_34CE98)
            }else {
                self.text_label.backgroundColor = .white
                self.text_label.addLayerCorner(2, 0.5, .color_cccccc)
            }
        }
    }
    
    var edite: Bool = false
    
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
    }
    @IBAction func delBtnAct(_ sender: UIButton) {
    }
    
}
